﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using TiPort.TiEntityObjects;
using AppPort;
using TiEntityObject.Notification;

namespace Controllers
{
    public class NotificationController : Controller 
    {
        private static NotificationController instance;
        
        public static NotificationController Instance
        {
            get
            {
                if (NotificationController.instance == null)
                {
                    NotificationController.instance = new NotificationController();
                }
                return NotificationController.instance;
            }
        }
      
        public string GetNotifications(ServiceCmd p)
        {
           List<Notification> lst=  Helper.MongoTools.Instance.GetCollection<Notification>("db.Notification.find().limit(25).toArray()");
           string s = Helper.Json<Notification>.ListToJson(lst);
           return s;
        }
        
    }
}
